From: Dan Winship Date: Wed, 23 Mar 2011 20:05:38 +0000 (-0400) Subject: messageTray: fix clicking on links again X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8472 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=31b12635d1d97f4f709599138e0a41248398012a;p=gnome-shell.git messageTray: fix clicking on links again The change to make Notification an StButton (06d2c0af, bug 642978) broke links, because the link actor would ignore the button-press-event, allowing the notification actor to receive it and get a pointer grab, and so the link actor would never see the button-release-event. Fix that by accepting and discarding the button-press-event. https://bugzilla.gnome.org/show_bug.cgi?id=645613 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index f95180167..f592f4849 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -108,6 +108,12 @@ URLHighlighter.prototype = { } this.setMarkup(text, allowMarkup); + this.actor.connect('button-press-event', function() { + // Keep Notification.actor from seeing this and taking + // a pointer grab, which would block our button-release-event + // handler + return true; + }); this.actor.connect('button-release-event', Lang.bind(this, function (actor, event) { let urlId = this._findUrlAtPos(event); if (urlId != -1) {